Optimal. Leaf size=103 \[ -\frac {c^2}{2 a^2 x^2}+\frac {2 c (b c-a d)}{a^3 x}+\frac {(b c-a d)^2}{a^3 (a+b x)}+\frac {(b c-a d) (3 b c-a d) \log (x)}{a^4}-\frac {(b c-a d) (3 b c-a d) \log (a+b x)}{a^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {90}
\begin {gather*} \frac {\log (x) (b c-a d) (3 b c-a d)}{a^4}-\frac {(b c-a d) (3 b c-a d) \log (a+b x)}{a^4}+\frac {2 c (b c-a d)}{a^3 x}+\frac {(b c-a d)^2}{a^3 (a+b x)}-\frac {c^2}{2 a^2 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{x^3 (a+b x)^2} \, dx &=\int \left (\frac {c^2}{a^2 x^3}+\frac {2 c (-b c+a d)}{a^3 x^2}+\frac {(b c-a d) (3 b c-a d)}{a^4 x}-\frac {b (-b c+a d)^2}{a^3 (a+b x)^2}+\frac {b (b c-a d) (-3 b c+a d)}{a^4 (a+b x)}\right ) \, dx\\ &=-\frac {c^2}{2 a^2 x^2}+\frac {2 c (b c-a d)}{a^3 x}+\frac {(b c-a d)^2}{a^3 (a+b x)}+\frac {(b c-a d) (3 b c-a d) \log (x)}{a^4}-\frac {(b c-a d) (3 b c-a d) \log (a+b x)}{a^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 109, normalized size = 1.06 \begin {gather*} -\frac {\frac {a^2 c^2}{x^2}+\frac {4 a c (-b c+a d)}{x}-\frac {2 a (b c-a d)^2}{a+b x}-2 \left (3 b^2 c^2-4 a b c d+a^2 d^2\right ) \log (x)+2 \left (3 b^2 c^2-4 a b c d+a^2 d^2\right ) \log (a+b x)}{2 a^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 123, normalized size = 1.19
method | result | size |
default | \(-\frac {\left (a^{2} d^{2}-4 a b c d +3 b^{2} c^{2}\right ) \ln \left (b x +a \right )}{a^{4}}+\frac {a^{2} d^{2}-2 a b c d +b^{2} c^{2}}{a^{3} \left (b x +a \right )}-\frac {c^{2}}{2 a^{2} x^{2}}+\frac {\left (a^{2} d^{2}-4 a b c d +3 b^{2} c^{2}\right ) \ln \left (x \right )}{a^{4}}-\frac {2 c \left (a d -b c \right )}{a^{3} x}\) | \(123\) |
norman | \(\frac {\frac {b \left (-a^{2} d^{2}+4 a b c d -3 b^{2} c^{2}\right ) x^{3}}{a^{4}}-\frac {c^{2}}{2 a}-\frac {c \left (4 a d -3 b c \right ) x}{2 a^{2}}}{x^{2} \left (b x +a \right )}+\frac {\left (a^{2} d^{2}-4 a b c d +3 b^{2} c^{2}\right ) \ln \left (x \right )}{a^{4}}-\frac {\left (a^{2} d^{2}-4 a b c d +3 b^{2} c^{2}\right ) \ln \left (b x +a \right )}{a^{4}}\) | \(130\) |
risch | \(\frac {\frac {\left (a^{2} d^{2}-4 a b c d +3 b^{2} c^{2}\right ) x^{2}}{a^{3}}-\frac {c \left (4 a d -3 b c \right ) x}{2 a^{2}}-\frac {c^{2}}{2 a}}{x^{2} \left (b x +a \right )}-\frac {\ln \left (b x +a \right ) d^{2}}{a^{2}}+\frac {4 \ln \left (b x +a \right ) b c d}{a^{3}}-\frac {3 \ln \left (b x +a \right ) b^{2} c^{2}}{a^{4}}+\frac {\ln \left (-x \right ) d^{2}}{a^{2}}-\frac {4 \ln \left (-x \right ) b c d}{a^{3}}+\frac {3 \ln \left (-x \right ) b^{2} c^{2}}{a^{4}}\) | \(150\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.33, size = 135, normalized size = 1.31 \begin {gather*} -\frac {a^{2} c^{2} - 2 \, {\left (3 \, b^{2} c^{2} - 4 \, a b c d + a^{2} d^{2}\right )} x^{2} - {\left (3 \, a b c^{2} - 4 \, a^{2} c d\right )} x}{2 \, {\left (a^{3} b x^{3} + a^{4} x^{2}\right )}} - \frac {{\left (3 \, b^{2} c^{2} - 4 \, a b c d + a^{2} d^{2}\right )} \log \left (b x + a\right )}{a^{4}} + \frac {{\left (3 \, b^{2} c^{2} - 4 \, a b c d + a^{2} d^{2}\right )} \log \left (x\right )}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 208 vs.
\(2 (101) = 202\).
time = 1.02, size = 208, normalized size = 2.02 \begin {gather*} -\frac {a^{3} c^{2} - 2 \, {\left (3 \, a b^{2} c^{2} - 4 \, a^{2} b c d + a^{3} d^{2}\right )} x^{2} - {\left (3 \, a^{2} b c^{2} - 4 \, a^{3} c d\right )} x + 2 \, {\left ({\left (3 \, b^{3} c^{2} - 4 \, a b^{2} c d + a^{2} b d^{2}\right )} x^{3} + {\left (3 \, a b^{2} c^{2} - 4 \, a^{2} b c d + a^{3} d^{2}\right )} x^{2}\right )} \log \left (b x + a\right ) - 2 \, {\left ({\left (3 \, b^{3} c^{2} - 4 \, a b^{2} c d + a^{2} b d^{2}\right )} x^{3} + {\left (3 \, a b^{2} c^{2} - 4 \, a^{2} b c d + a^{3} d^{2}\right )} x^{2}\right )} \log \left (x\right )}{2 \, {\left (a^{4} b x^{3} + a^{5} x^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 262 vs.
\(2 (90) = 180\).
time = 0.49, size = 262, normalized size = 2.54 \begin {gather*} \frac {- a^{2} c^{2} + x^{2} \cdot \left (2 a^{2} d^{2} - 8 a b c d + 6 b^{2} c^{2}\right ) + x \left (- 4 a^{2} c d + 3 a b c^{2}\right )}{2 a^{4} x^{2} + 2 a^{3} b x^{3}} + \frac {\left (a d - 3 b c\right ) \left (a d - b c\right ) \log {\left (x + \frac {a^{3} d^{2} - 4 a^{2} b c d + 3 a b^{2} c^{2} - a \left (a d - 3 b c\right ) \left (a d - b c\right )}{2 a^{2} b d^{2} - 8 a b^{2} c d + 6 b^{3} c^{2}} \right )}}{a^{4}} - \frac {\left (a d - 3 b c\right ) \left (a d - b c\right ) \log {\left (x + \frac {a^{3} d^{2} - 4 a^{2} b c d + 3 a b^{2} c^{2} + a \left (a d - 3 b c\right ) \left (a d - b c\right )}{2 a^{2} b d^{2} - 8 a b^{2} c d + 6 b^{3} c^{2}} \right )}}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.91, size = 166, normalized size = 1.61 \begin {gather*} \frac {{\left (3 \, b^{3} c^{2} - 4 \, a b^{2} c d + a^{2} b d^{2}\right )} \log \left ({\left | -\frac {a}{b x + a} + 1 \right |}\right )}{a^{4} b} + \frac {\frac {b^{5} c^{2}}{b x + a} - \frac {2 \, a b^{4} c d}{b x + a} + \frac {a^{2} b^{3} d^{2}}{b x + a}}{a^{3} b^{3}} + \frac {5 \, b^{2} c^{2} - 4 \, a b c d - \frac {2 \, {\left (3 \, a b^{3} c^{2} - 2 \, a^{2} b^{2} c d\right )}}{{\left (b x + a\right )} b}}{2 \, a^{4} {\left (\frac {a}{b x + a} - 1\right )}^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.15, size = 143, normalized size = 1.39 \begin {gather*} -\frac {\frac {c^2}{2\,a}-\frac {x^2\,\left (a^2\,d^2-4\,a\,b\,c\,d+3\,b^2\,c^2\right )}{a^3}+\frac {c\,x\,\left (4\,a\,d-3\,b\,c\right )}{2\,a^2}}{b\,x^3+a\,x^2}-\frac {2\,\mathrm {atanh}\left (\frac {\left (a\,d-b\,c\right )\,\left (a\,d-3\,b\,c\right )\,\left (a+2\,b\,x\right )}{a\,\left (a^2\,d^2-4\,a\,b\,c\,d+3\,b^2\,c^2\right )}\right )\,\left (a\,d-b\,c\right )\,\left (a\,d-3\,b\,c\right )}{a^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________